<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=100%" />
<title>友邦保险</title>
<link href="main.css"  type="text/css"  rel="stylesheet" />
<script language="javascript" src="js/jquery.js"></script>
<script language="javascript" src="js/pcasunzip.js"></script>
<script language="javascript">
function ajaxSubmit()
{
	var province3 = $("select[name='province3']");
	var city3 = $("select[name='city3']");
	var pho = $("input[name='pho']");
	var name = $("input[name='name']");
	var code = $("input[name='code']");
	var validate = $("input[name='validate']");
	var idnumber = $("input[name='idnumber']");
	if(name.val() == '')  
	{
		alert('请输入姓名');
		name[0].focus();
		return false;
	}else if(idnumber.val() == '')  
	{
		alert('请输入身份证后四位');
		idnumber[0].focus();
		return false;
	}else if(idnumber.val().length!=4)  
	{
		alert('请输入身份证后四位');
		idnumber[0].focus();
		return false;
	}
	else if(pho.val() == '')  
	{
		alert('请输入手机');
		pho[0].focus();
		return false;
	}else if(province3.val() == "省" || province3.val() == "" ) 
	{  
		alert('请选择省');
		province3[0].focus();
		return false;
	}
	else if(city3.val() == "市"  || city3.val() == "") 
	{  
		alert('请选择市');
		city3[0].focus();
		return false;
	}else if(code.val() == '')  
	{
		alert('请输入邀请码');
		code[0].focus();
		return false;
	}else if(code.val().length!=9)  
	{
		alert('请输入9位保险营销员编号，输入不足9位时在前端加0。如无推荐营销员，请填9个0');
		code[0].focus();
		return false;
	}else if(validate.val() == '')  
	{
		alert('请输入验证码');
		validate[0].focus();
		return false;
	}
	
	var address = province3.val()+'-'+city3.val();
	$("input[name='address']").val(address);
	//发送ajax请求
	$.ajax
	({
		type:"POST",
		dataType:'json',
		cache:false,
		timeout:10000,
		async:false,
		url:"../nmp/nmp.action",
		data:$("#formid").serialize(),
		success:function(json)
		   {
			  if(json.success==true)
			  {		
				  //alert("提交成功！")
				  window.location.href="ok.jsp";
			  }
			  else
			  {
				  alert("提交没有成功:"+json.message);
			  }
			},
		error:function(arg1,arg2)
		   {
				alert("浏览器提交失败:" + arg1 + " "+arg2);
		   }
	});
	return false;
}
</script>
<style>
body{text-align: center;}
.bigdiv{text-align: left; margin-left:auto; margin-right: auto;}
.intr p{margin:0 0 1px 0; line-height: 1.5; font-size:12px;}
.intr .icon{margin-right:5px; vertical-align:middle; }
.intr .hasIcon{margin:0 0 1px 0;font-size:12px;}
.footer{position:relative; height:61px; background-image: url(images/footer.jpg); background-repeat: no-repeat; margin-top:10px;}
#formid select{ height:18px; font-size:12px; vertical-align: middle;}
</style>
</head>
<body>
<div class="bigdiv" style="width:322px; height:558px;">
	<div class="top nofont">悠享安康 让生活更悠然
	</div>
	
	<div>
		<img style="border-width: 0; width:322px; height:138px;" src="images/main.gif"></img>
	</div>
	
	<div style="font-size: 0; border-top:3px solid #d31145; ">
	</div>
	
	<div class="intr" style="width:293px; margin-left:20px; margin-top:13px;">
		<p class="" style="color:#d31145; font-weight: bold; font-size:15px;">
		2013年友邦新贵客户活动诚邀您的参加，赢取“银卡俱乐部”会员资格，尊享多重贴心服务：
</p>
	<p class="hasIcon"><img class="icon" src="images/icon.jpg" ></img>电话医生服务</p>
	<p class="hasIcon"><img class="icon" src="images/icon.jpg" ></img>法律顾问服务</p>
	<p class="hasIcon"><img class="icon" src="images/icon.jpg" ></img>国际国内SOS救援服务</p>
	<p class="hasIcon"><img class="icon" src="images/icon.jpg" ></img>理赔及保单优先服务</p>
		<p class="" style="color:#d31145; font-weight: bold; font-size:14px; margin-top:5px;">
		即日起至10月31日，您只需提交以下信息，即可参与幸运大抽奖，众多丰富好礼等您来拿！
</p>
		<p class="hasOrder">一等奖（4名）：Ipad Mini</p>
		<p class="hasOrder">二等奖（8名）：高级迷你音响</p>
		<p class="hasOrder">三等奖（60名）：价值100元礼品券</p>
		<p class="hasOrder">参与奖（160名）：价值50元礼品券</p>
		<p class="" style="color:#d31145; font-weight: bold; font-size:14px; margin-top:5px;">* 详细的活动规则请咨询您的保险营销员。</p>	
	</div>
	
	<form id="formid" action="" method="post"  name="form1" class="my_form" onsubmit="return false;" style="position: relative; display: block;">
		<input type="hidden" name="address"></input>
		<input type="hidden" name="from" value="xingui"></input>
    	<p><span class="redstar">*</span>姓名 :　 <input  type="text" name="name"  placeholder="请输入姓名"   />&nbsp;&nbsp;&nbsp;&nbsp;</p>
    	<p><span class="redstar">*</span>身份证后四位 :　 <input style="width:142px;" type="text" name="idnumber"  placeholder="请输入身份证后四位"   />&nbsp;&nbsp;&nbsp;&nbsp;</p>
        
     	<p><span class="redstar">*</span>手机 :　 <input type="" name="pho" placeholder="请输入手机"  /></p>
        
        <p><span class="redstar">*</span>所在地 : 
        <select id='c1' name='province3' style="width:75px;"></select>省&nbsp;
        <select id='c2'  name='city3' style="width:75px;"></select>市
        <select id='c3'  name='area3' style="width:75px;display:none"></select>
        </p>
    	<p>邮箱地址: <input type="text" name="email"  placeholder="请输入邮箱"   />&nbsp;&nbsp;&nbsp;&nbsp;</p>
     
        <p style="margin-bottom:0"><span class="redstar">*</span>邀请码 : <input type="" name="code" placeholder="请输入邀请码"  /></p>
        <p style="padding-left:50px; padding-right:30px; color:#424242; font-size: 11px;">请输入9位保险营销员编号，输入不足9位时在前端加 0， 
        <span style="color:#d31145;" >如无推荐营销员，请填9个0</span>
        </p>
		<p>
		<span class="redstar">*</span>验证码 : <input type="text" name="validate" style="width:60px;border:1px solid #999;"/>
                <span style="display:inline-block;width:77px;height:23px;vertical-align:top">
                	<image id="server_image" src="../xml/image.action?t=100" style="width:77px;height:23px;"></image>
                </span>
                <span style="color:#6b6b6b;"><a style="color:#6b6b6b; text-decoration: none;" href="#" onclick="$('#server_image').attr('src','../xml/image.action?t='+(new Date()).getTime()); return false;">看不清楚</a></span>
		</p>
        <p style="font-size:11px;color:#d31145">注意：如下拉框显示有误,请关闭UC浏览器的极速模式
        <br>
        请准确填写手机号码，填写的手机号码将做为抽奖依据,每个手机号码限参加一次抽奖
        </p>
  </form>
  <div class="footer">
  	<a href="#" onclick="ajaxSubmit(); return false;" style="display: block; position: absolute; width:119px; height:44px; left:100px; top:10px; background-image: url(images/ok.jpg); background-repeat: no-repeat;"></a>
  </div>
</div>
<script language='javascript'>
new PCAS("province3","city3","area3");
</script>
<body>